From: Aleksander Morgado Date: Thu, 15 Nov 2012 21:47:32 +0000 (+0100) Subject: networkAgent: ensure auto-register is set when the component is enabled X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5398 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=00201f7e6cce22690fae2b672b5759149ec89df4;p=gnome-shell.git networkAgent: ensure auto-register is set when the component is enabled Setting auto-register to true launches the initial registration, and will afterwards re-launch the agent registration if NetworkManager gets restarted. When the component is disabled we'll first disable auto-registration, and only then request to unregister. https://bugzilla.gnome.org/show_bug.cgi?id=688379 --- diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 986c4bd63..d1c984643 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -598,7 +598,7 @@ const NetworkAgent = new Lang.Class({ }, enable: function() { - this._native.register(); + this._native.auto_register = true; }, disable: function() { @@ -612,6 +612,7 @@ const NetworkAgent = new Lang.Class({ this._vpnRequests[requestId].cancel(true); this._vpnRequests = { }; + this._native.auto_register = false; this._native.unregister(); },